{% extends "../templates/ajax/main_content_base.html" %}
{% block intro %}{% endblock %}
{% block page_name %}my_homework_list{% endblock %}
{% block content %}


<div id='homework_list_content'>
	
</div>
<div class="clear"></div>

<div class="pagination">
<form>
<select id="type_select" name="type_select"
							class="small-input" style="float:left">
							<option value="">所有作业</option>
							<option value="overdue">已经截止的作业</option>
							<option value="unoverdue">未截止的作业</option>
							
						</select>
						</form>
        <a href="#" class="page" title="1">&laquo; 首页</a>
        <!--Ajax生成页码部分-->
        <span class="pageList"></span>
        <a href="#" class="page lastPage" title="">末页 &raquo;</a>
    </div> <!-- End .pagination -->
<!-- End .pagination -->

<script type="text/javascript" src="/resources/scripts/paging.js"></script>
<script type="text/javascript">
	type = ''
	limit = {{request.settings.homework_number_per_page}}
    function getHomeworkList(){
        $.get("my_homework_list_content", {
            start: start,
            limit: limit,
            type:type
        }, function(html){
            $("#homework_list_content").hide().html(html);
            $("#homework_list_content").show("fast");
        }, "html");
    }
	
    function getHomeworkCount(){
        $.getJSON("my_homework_count", {type:type
        }, function(json){
            setCount(json['count']);
        });
    }
 
    getListFun = getHomeworkList
    getCountFun = getHomeworkCount
    pageInit()
    $("#type_select").change(function(){type = $(this).val();pageInit()});
</script>
{% endblock %}